package com.san.hkhospital.entity;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

/**
 * ClassName:ApparatusExample
 * PackageName:com.san.hkhospital.entity
 * Description:
 *
 * @Author:yy
 * @CreatedAt:2024/11/13 19:26
 * 
 */
 
 
public class ApparatusExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public ApparatusExample() {
        oredCriteria = new ArrayList<>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andAptIdIsNull() {
            addCriterion("apt_id is null");
            return (Criteria) this;
        }

        public Criteria andAptIdIsNotNull() {
            addCriterion("apt_id is not null");
            return (Criteria) this;
        }

        public Criteria andAptIdEqualTo(Integer value) {
            addCriterion("apt_id =", value, "aptId");
            return (Criteria) this;
        }

        public Criteria andAptIdNotEqualTo(Integer value) {
            addCriterion("apt_id <>", value, "aptId");
            return (Criteria) this;
        }

        public Criteria andAptIdGreaterThan(Integer value) {
            addCriterion("apt_id >", value, "aptId");
            return (Criteria) this;
        }

        public Criteria andAptIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("apt_id >=", value, "aptId");
            return (Criteria) this;
        }

        public Criteria andAptIdLessThan(Integer value) {
            addCriterion("apt_id <", value, "aptId");
            return (Criteria) this;
        }

        public Criteria andAptIdLessThanOrEqualTo(Integer value) {
            addCriterion("apt_id <=", value, "aptId");
            return (Criteria) this;
        }

        public Criteria andAptIdIn(List<Integer> values) {
            addCriterion("apt_id in", values, "aptId");
            return (Criteria) this;
        }

        public Criteria andAptIdNotIn(List<Integer> values) {
            addCriterion("apt_id not in", values, "aptId");
            return (Criteria) this;
        }

        public Criteria andAptIdBetween(Integer value1, Integer value2) {
            addCriterion("apt_id between", value1, value2, "aptId");
            return (Criteria) this;
        }

        public Criteria andAptIdNotBetween(Integer value1, Integer value2) {
            addCriterion("apt_id not between", value1, value2, "aptId");
            return (Criteria) this;
        }

        public Criteria andAptNameIsNull() {
            addCriterion("apt_name is null");
            return (Criteria) this;
        }

        public Criteria andAptNameIsNotNull() {
            addCriterion("apt_name is not null");
            return (Criteria) this;
        }

        public Criteria andAptNameEqualTo(String value) {
            addCriterion("apt_name =", value, "aptName");
            return (Criteria) this;
        }

        public Criteria andAptNameNotEqualTo(String value) {
            addCriterion("apt_name <>", value, "aptName");
            return (Criteria) this;
        }

        public Criteria andAptNameGreaterThan(String value) {
            addCriterion("apt_name >", value, "aptName");
            return (Criteria) this;
        }

        public Criteria andAptNameGreaterThanOrEqualTo(String value) {
            addCriterion("apt_name >=", value, "aptName");
            return (Criteria) this;
        }

        public Criteria andAptNameLessThan(String value) {
            addCriterion("apt_name <", value, "aptName");
            return (Criteria) this;
        }

        public Criteria andAptNameLessThanOrEqualTo(String value) {
            addCriterion("apt_name <=", value, "aptName");
            return (Criteria) this;
        }

        public Criteria andAptNameLike(String value) {
            addCriterion("apt_name like", value, "aptName");
            return (Criteria) this;
        }

        public Criteria andAptNameNotLike(String value) {
            addCriterion("apt_name not like", value, "aptName");
            return (Criteria) this;
        }

        public Criteria andAptNameIn(List<String> values) {
            addCriterion("apt_name in", values, "aptName");
            return (Criteria) this;
        }

        public Criteria andAptNameNotIn(List<String> values) {
            addCriterion("apt_name not in", values, "aptName");
            return (Criteria) this;
        }

        public Criteria andAptNameBetween(String value1, String value2) {
            addCriterion("apt_name between", value1, value2, "aptName");
            return (Criteria) this;
        }

        public Criteria andAptNameNotBetween(String value1, String value2) {
            addCriterion("apt_name not between", value1, value2, "aptName");
            return (Criteria) this;
        }

        public Criteria andAptPriceIsNull() {
            addCriterion("apt_price is null");
            return (Criteria) this;
        }

        public Criteria andAptPriceIsNotNull() {
            addCriterion("apt_price is not null");
            return (Criteria) this;
        }

        public Criteria andAptPriceEqualTo(BigDecimal value) {
            addCriterion("apt_price =", value, "aptPrice");
            return (Criteria) this;
        }

        public Criteria andAptPriceNotEqualTo(BigDecimal value) {
            addCriterion("apt_price <>", value, "aptPrice");
            return (Criteria) this;
        }

        public Criteria andAptPriceGreaterThan(BigDecimal value) {
            addCriterion("apt_price >", value, "aptPrice");
            return (Criteria) this;
        }

        public Criteria andAptPriceGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("apt_price >=", value, "aptPrice");
            return (Criteria) this;
        }

        public Criteria andAptPriceLessThan(BigDecimal value) {
            addCriterion("apt_price <", value, "aptPrice");
            return (Criteria) this;
        }

        public Criteria andAptPriceLessThanOrEqualTo(BigDecimal value) {
            addCriterion("apt_price <=", value, "aptPrice");
            return (Criteria) this;
        }

        public Criteria andAptPriceIn(List<BigDecimal> values) {
            addCriterion("apt_price in", values, "aptPrice");
            return (Criteria) this;
        }

        public Criteria andAptPriceNotIn(List<BigDecimal> values) {
            addCriterion("apt_price not in", values, "aptPrice");
            return (Criteria) this;
        }

        public Criteria andAptPriceBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("apt_price between", value1, value2, "aptPrice");
            return (Criteria) this;
        }

        public Criteria andAptPriceNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("apt_price not between", value1, value2, "aptPrice");
            return (Criteria) this;
        }

        public Criteria andAptCostIsNull() {
            addCriterion("apt_cost is null");
            return (Criteria) this;
        }

        public Criteria andAptCostIsNotNull() {
            addCriterion("apt_cost is not null");
            return (Criteria) this;
        }

        public Criteria andAptCostEqualTo(BigDecimal value) {
            addCriterion("apt_cost =", value, "aptCost");
            return (Criteria) this;
        }

        public Criteria andAptCostNotEqualTo(BigDecimal value) {
            addCriterion("apt_cost <>", value, "aptCost");
            return (Criteria) this;
        }

        public Criteria andAptCostGreaterThan(BigDecimal value) {
            addCriterion("apt_cost >", value, "aptCost");
            return (Criteria) this;
        }

        public Criteria andAptCostGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("apt_cost >=", value, "aptCost");
            return (Criteria) this;
        }

        public Criteria andAptCostLessThan(BigDecimal value) {
            addCriterion("apt_cost <", value, "aptCost");
            return (Criteria) this;
        }

        public Criteria andAptCostLessThanOrEqualTo(BigDecimal value) {
            addCriterion("apt_cost <=", value, "aptCost");
            return (Criteria) this;
        }

        public Criteria andAptCostIn(List<BigDecimal> values) {
            addCriterion("apt_cost in", values, "aptCost");
            return (Criteria) this;
        }

        public Criteria andAptCostNotIn(List<BigDecimal> values) {
            addCriterion("apt_cost not in", values, "aptCost");
            return (Criteria) this;
        }

        public Criteria andAptCostBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("apt_cost between", value1, value2, "aptCost");
            return (Criteria) this;
        }

        public Criteria andAptCostNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("apt_cost not between", value1, value2, "aptCost");
            return (Criteria) this;
        }

        public Criteria andStateIdIsNull() {
            addCriterion("state_id is null");
            return (Criteria) this;
        }

        public Criteria andStateIdIsNotNull() {
            addCriterion("state_id is not null");
            return (Criteria) this;
        }

        public Criteria andStateIdEqualTo(Integer value) {
            addCriterion("state_id =", value, "stateId");
            return (Criteria) this;
        }

        public Criteria andStateIdNotEqualTo(Integer value) {
            addCriterion("state_id <>", value, "stateId");
            return (Criteria) this;
        }

        public Criteria andStateIdGreaterThan(Integer value) {
            addCriterion("state_id >", value, "stateId");
            return (Criteria) this;
        }

        public Criteria andStateIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("state_id >=", value, "stateId");
            return (Criteria) this;
        }

        public Criteria andStateIdLessThan(Integer value) {
            addCriterion("state_id <", value, "stateId");
            return (Criteria) this;
        }

        public Criteria andStateIdLessThanOrEqualTo(Integer value) {
            addCriterion("state_id <=", value, "stateId");
            return (Criteria) this;
        }

        public Criteria andStateIdIn(List<Integer> values) {
            addCriterion("state_id in", values, "stateId");
            return (Criteria) this;
        }

        public Criteria andStateIdNotIn(List<Integer> values) {
            addCriterion("state_id not in", values, "stateId");
            return (Criteria) this;
        }

        public Criteria andStateIdBetween(Integer value1, Integer value2) {
            addCriterion("state_id between", value1, value2, "stateId");
            return (Criteria) this;
        }

        public Criteria andStateIdNotBetween(Integer value1, Integer value2) {
            addCriterion("state_id not between", value1, value2, "stateId");
            return (Criteria) this;
        }

        public Criteria andSectionIdIsNull() {
            addCriterion("section_id is null");
            return (Criteria) this;
        }

        public Criteria andSectionIdIsNotNull() {
            addCriterion("section_id is not null");
            return (Criteria) this;
        }

        public Criteria andSectionIdEqualTo(Integer value) {
            addCriterion("section_id =", value, "sectionId");
            return (Criteria) this;
        }

        public Criteria andSectionIdNotEqualTo(Integer value) {
            addCriterion("section_id <>", value, "sectionId");
            return (Criteria) this;
        }

        public Criteria andSectionIdGreaterThan(Integer value) {
            addCriterion("section_id >", value, "sectionId");
            return (Criteria) this;
        }

        public Criteria andSectionIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("section_id >=", value, "sectionId");
            return (Criteria) this;
        }

        public Criteria andSectionIdLessThan(Integer value) {
            addCriterion("section_id <", value, "sectionId");
            return (Criteria) this;
        }

        public Criteria andSectionIdLessThanOrEqualTo(Integer value) {
            addCriterion("section_id <=", value, "sectionId");
            return (Criteria) this;
        }

        public Criteria andSectionIdIn(List<Integer> values) {
            addCriterion("section_id in", values, "sectionId");
            return (Criteria) this;
        }

        public Criteria andSectionIdNotIn(List<Integer> values) {
            addCriterion("section_id not in", values, "sectionId");
            return (Criteria) this;
        }

        public Criteria andSectionIdBetween(Integer value1, Integer value2) {
            addCriterion("section_id between", value1, value2, "sectionId");
            return (Criteria) this;
        }

        public Criteria andSectionIdNotBetween(Integer value1, Integer value2) {
            addCriterion("section_id not between", value1, value2, "sectionId");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}